<%-- 
    Document   : left-menu
    Created on : Apr 25, 2012, 1:27:19 PM
    Author     : s.rainoldi
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="left-menu">
    <h2>Categories</h2>
    <ul>
        <li><a href="${server_home}category"><b>All Categories</b> <num></num></a></li>
        <%--<li><a href="/" class="selected"><span></span>NOME<num>3</num></a></li>--%>
        <c:forEach items="${applicationScope.categories}" var="category">
            <li>
                <c:choose>
                    <c:when test="${selectedCategory.id == category.id}">
                        <a href="${server_home}${category.url}" class="selected">
                        </c:when>
                        <c:otherwise>
                            <a href="${server_home}${category.url}">
                            </c:otherwise>
                        </c:choose>
                        <span></span>
                        ${category.title} <num>${fn:length(category.discussions)}</num>
                    </a>
            </li>
        </c:forEach>
</ul>
</div>
